-
Notifications
You must be signed in to change notification settings - Fork 1
Add necessary files for OPCUA ioc build #919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There's a lot of example code in this PR which makes it a bit tricky to review - could we cut down this IOC to the bits we're actually using? I think probably the entire
exampleTop
directory can go. - Please add some documentation on the wiki. I think we probably need two pages:
- One for OPCUA in general (e.g. write the documentation to help someone who is configuring a new OPCUA device on another instrument). Example topics:
- How is authentication being handled?
- Do any settings in the PLC side need adjusting to get communicating properly?
- Where are instrument-specific configs loaded from (looks like
opcua
folder in configs area, but please document this) - Where are instrument-specific DBs defined
- Any troubleshooting information you know of - e.g. what errors have you seen during the course of development and how were they resolved?
- As a supporter / on-call person, what would I need/want to know if I get a call saying communication with an OPCUA server isn't working?
- One for the MAPS vacuum system in particular, describing the operation/code behind the MAPS vacuum. No need to repeat the generic OPCUA IOC information here, link to the page above, just describe what is specific for MAPS' implementation.
- As a supporter / on-call person, what would I need/want to know if I get a call saying communication with MAPS' vacuum system isn't working?
- I think both of these pages are sub-pages under the
PLCs
section of the docs
- One for OPCUA in general (e.g. write the documentation to help someone who is configuring a new OPCUA device on another instrument). Example topics:
- Please add release notes
opcuaOptions OPC1 sec-mode=None, sec-id="\Instrument\Settings\config\NDW2548\configurations\opcua\cert.txt", debug=10 | ||
opcuaClientCertificate "C:\Instrument\Settings\config\NDW2548\configurations\opcua\client_cert.der", "C:\Instrument\Settings\config\NDW2548\configurations\opcua\client_private_key.pem" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the ICPCONFIGROOT
macro or similar here, so that we're not hard-coding machine names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell this DB is specific for MAPS' vacuum system - I'd suggest a name something like maps_vacuum_tpg1
for this DB perhaps?
Just thinking ahead to if/when we get more of these DBs for PLCs on other instruments.
record(stringin, "$(P)$(R):PE_UNDERRANGE") { | ||
field(DTYP, "OPCUA") | ||
field(INP, "@$(SUBS) ns=4;s=Opc_TPG1_Statuses.PE_Underrange_Control") | ||
field(SCAN, "I/O Intr") | ||
field(TSE, "-2") | ||
field(TPRO, "$(DEBUG=0)") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: since all the rest of the records in this file are basically identical to each other just with different type/name/opcua string, you could probably clean this up quite significantly using templates+substitutions.
##ISIS## Stuff that needs to be done after all records are loaded but before iocInit is called | ||
< $(IOCSTARTUP)/preiocinit.cmd | ||
|
||
#! $(SUPPORT)/OPCUA/bin/windows-x64/opcua |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right - are you sure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Binaries should not be committed to the repo.
But see comment elsewhere - maybe we get rid of the whole exampleTop
folder?
|
||
# IOC-specific support module | ||
OPCUA=$(SUPPORT)/OPCUA/master | ||
TPG=$(SUPPORT)/TPG/master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline at eof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to have a huge amount in common with server-1.db
.
Can we use a header for the few records that are only in server-1
, and then load the same DB twice but with different macros to avoid the duplication? Or use template/substitutions?
Description of work
OPCUA IOC module that should be general purpose, for other OPC servers that need an IOC configuration.
OPCUA_01.cmd
should be placed inC:\Instrument\Settings\config\[instrument name]\configurations\opcua
folder, alongside a private key found on the network sharesTo test
Please confirm that this builds and runs correctly with the OPC PLC on MAPS, and that the OPCUA module looks accurately like other EPICS IOCs (this is my first time porting a new module to EPICS like this).
You will need to copy the
opcua\MAPS_OPCUA\
folder from the non-public shares into your config...\<NDW###\configurations\
copy and paste the folder there and name itopcua
so it can get pickup up by the IOC. Only copy theMAP_OPCUA
folder itself and rename it.MAPS: Provide support to read pressure values from vacuum PLC IBEX#8586
Acceptance criteria
MAPS-OPC-Server
Code Review
Functional Tests
..._0n
wheren>1
) run correctlymacLib: macro
to find instances ofmacLib: macro [macro name] is undefined...
Final steps